package com.ykh.spring.pojo.controller;

import com.ykh.spring.pojo.service.BookService;
import com.ykh.spring.pojo.service.impl.BookServiceImpl;
import com.ykh.spring.pojo.service.impl.CheckOutServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2022-08-25
 * Time: 21:26
 */
@Controller
public class BookController {
    @Autowired
    private BookServiceImpl bookService;
    @Autowired
    private CheckOutServiceImpl checkOutService;

    public void buyBook(Integer bookId, Integer userId) {
        bookService.buyBook(bookId,userId);
    }

    public void checkOut(Integer[] bookIds, Integer userId){
        checkOutService.checkOut(bookIds,userId);
    }

}
